Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFR-2239: Remove error codes from error page #536

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

jackiequach
Copy link
Collaborator

@jackiequach jackiequach commented Oct 10, 2024

Jira Ticket
Figma Designs

This PR does the following:

  • Removes error codes on error page and passes the error code to the Airtable API
  • Updates spacing for mobile view of error page

Testing requirements & instructions:

Before (Desktop):
image

After (Desktop):
image

Before (Mobile):
image

After (Mobile):
image

Copy link

vercel bot commented Oct 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sfr-bookfinder-front-end ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 3:22pm

@@ -38,7 +44,7 @@ const Feedback: React.FC<any> = ({ location }) => {
values: React.ComponentProps<typeof FeedbackBox>["onSubmit"]
) => {
submitFeedback({
feedback: values.comment,
feedback: isError ? `${statusCode} - ${values.comment}` : values.comment,
Copy link
Contributor

@kylevillegas93 kylevillegas93 Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like statusCode could be null though I hope that's never the case so we may just want to have a default. What are your thoughts?

{statusCode ?? 'Unknown'} - ${values.comment}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may also want to prefix the status code with something like Error Code: or HTTP Status Code: just so folks understand what the status code means!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good idea!

Copy link
Contributor

@kylevillegas93 kylevillegas93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some before/after screenshots when you get the chance? Super helpful for the reviewer to quickly spot check the design changes. Thanks!

The vercel link https://sfr-bookfinder-front-end-git-sfr-2239-remove-error-codes-nypl.vercel.app/ can't find the home page but the error page looks good.

Comment on lines +47 to +49
feedback: isError
? `Error Code: ${statusCode ?? "Unknown"} - ${values.comment}`
: values.comment,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice - looks good!

heading: "Something went wrong on our end.",
subText: "We encountered an error while trying to load the page. ",
tryText: "Try refreshing the page or ",
},
404: {
overline: "error 404",
heading: "We couldn't find that page.",
subText:
"The page you were looking for doesn't exist or may have moved elsewhere. ",
tryText: "Try a different URL or ",
},
400: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May want to consider having a default error map.

width={100}
/>
<Text size="overline1">{errorMap[statusCode].overline}</Text>
<Heading marginTop="s" marginBottom="s">
{errorMap[statusCode].heading}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you may just want guard against unexpected error codes like 502, 503, 403 and go to the default error mapping.

Copy link
Collaborator Author

@jackiequach jackiequach Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spoke with Apoorva and she recommended that we use the 400 error as default.

@jackiequach jackiequach merged commit 9208583 into development Oct 15, 2024
8 checks passed
@jackiequach jackiequach deleted the SFR-2239/remove-error-codes branch October 15, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants